package com.cykj.cotroller;

import com.cykj.service.UserSimplyPayService;
import com.cykj.vo.orderVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("pay")
@RestController
public class UserSimplpayController {
    @Autowired
    private UserSimplyPayService userSimplyPayService;
    @RequestMapping("/batchInsert")
    public int Insert(@RequestBody orderVo vo){
        int insert = userSimplyPayService.batchInsert(vo.getOrderNumber(), vo.getUserId(),vo.getProjectIds());
        return insert;
    }

    @RequestMapping("/orderInsert")
    public int orderInsert(@RequestBody orderVo vo){
        int i = userSimplyPayService.OrderInsert(vo.getOrderNumber(),vo.getUserId(),vo.getAllMoney());
        return i;
    }
}
